package com.game.centerserver.pojo.result;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

@Data
public class DSTServerProcessView {
    @JsonProperty("state")
    private int state;
    @JsonProperty("inited")
    private int inited;
    @JsonProperty("archive_id")
    private String archiveID;
    @JsonProperty("player_num")
    private int playerNum;
    @JsonProperty("mem_usage_size")
    private Long memUsageSize;
    @JsonProperty("mem_usage_ratio")
    private double memUsageRatio;
    @JsonProperty("cpu_usage")
    private Long cpuUsage;
    @JsonProperty("tag")
    private String tag;
    @JsonProperty("cpu_limit")
    private String cpu_limit;
    @JsonProperty("memry_limit")
    private String memry_limit;
    @JsonProperty("swap_limit")
    private String swap_limit;
    @JsonProperty("minutes_since_last_time_without_player")
    private Long minutesNoPlayer = -1L;
    

    public DSTServerProcessView(int state, int inited, 
        String archiveID, int playerNum, Long memUsageSize, double memUsageRatio, Long cpuUsage, 
        String tag,
        String cpu_limit, String memry_limit, String swap_limit) {
        this.state = state;
        this.inited = inited;
        this.archiveID = archiveID;
        this.playerNum = playerNum;
        this.memUsageSize = memUsageSize;
        this.memUsageRatio = memUsageRatio;
        this.cpuUsage = cpuUsage;
        this.tag = tag;
        this.cpu_limit = cpu_limit;
        this.memry_limit = memry_limit;
        this.swap_limit = swap_limit;
    }


    @Override
    public String toString() {
        return "DSTServerProcessView{" +
                "state=" + state +
                ", inited=" + inited +
                ", archiveID='" + archiveID + '\'' +
                ", playerNum=" + playerNum +
                ", memUsageSize=" + memUsageSize +
                ", memUsageRatio=" + memUsageRatio +
                ", cpuUsage=" + cpuUsage +
                ", tag='" + tag + '\'' +
                ", cpu_limit='" + cpu_limit + '\'' +
                ", memry_limit='" + memry_limit + '\'' +
                ", swap_limit='" + swap_limit + '\'' +
                ", minutesNoPlayer=" + minutesNoPlayer +
                '}';
    }
}
